<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="../../common/common.jsp" %>
<html>
<head>
    <title>员工列表</title>
    <%@ include file="../../common/common-resource.jsp"%>
</head>
<body>
    <div style="padding:0px; margin:0px;">
        <ul class="breadcrumb" style="  margin:0px; " >
            <li><a href="#">系统管理</a></li>
            <li>员工管理</li>
        </ul>
    </div>
    <div class="row alert alert-info"  style="margin:0px; padding:3px;" >
        <form class="form-horizontal" action="/system/employee/query" method="post">
            <div class="col-sm-1" >条件:</div>
            <div class="col-sm-3">
                <select class="form-control  input-sm" name="select">
                    <option value="1">姓名</option>
                    <option value="2">性别</option>
                </select>
            </div>
            <div class="col-sm-3">
                <input type="text" class="form-control input-sm" name="text"/>
            </div>
            <input type="submit" class="btn btn-danger" value="查询"/>
            <input type="button" class="btn btn-success" value="添加" onClick="javascript:window.location='/system/employee/toEdit?id='"/>
        </form>
    </div>
    <div class="row" style="padding:15px; padding-top:0px; ">
        <table class="table  table-condensed table-striped">
            <tr>
                <th>员工编号</th>
                <th>员工姓名</th>
                <th>员工性别</th>
                <th>员工年龄</th>
                <th>电话号码</th>
                <th>QQ</th>
                <th>入职时间</th>
                <th>操作</th>
            </tr>
            <c:forEach var="employee" items="${employeeList}">
                <tr>
                    <td>
                        <a href="/system/employee/detail?id=${employee.id}">${employee.id}</a>
                    </td>
                    <td>${employee.name}</td>
                    <td>
                        <c:if test="${employee.sex == 1}">男</c:if>
                        <c:if test="${employee.sex == 2}">女</c:if>
                    </td>
                    <td>${employee.age}</td>
                    <td>${employee.companyPhone}</td>
                    <td>${employee.qq}</td>
                    <td>
                        <fmt:formatDate value="${employee.entryDate}" dateStyle="default" type="date"/>
                    </td>
                    <td>
                        <a  href="/system/employee/toEdit?id=${employee.id}">修改</a>
                        <a  href="/system/employee/delete?id=${employee.id}">删除</a>
                    </td>
                </tr>
            </c:forEach>
        </table>
    </div>
</body>
</html>
